<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
	<th:block th:fragment="common_mobile_tabbar(index)">
		<div class="weui-tabbar">
		    <a th:if="${index == 1}" href="main.xhtml" class="weui-tabbar__item weui-bar__item--on">
		      <div class="weui-tabbar__icon">
		        <i class="fa fa-home"></i>
		      </div>
		      <p class="weui-tabbar__label">首页</p>
		    </a>
		    <a th:if="${index != 1}" href="main.xhtml" class="weui-tabbar__item">
		      <div class="weui-tabbar__icon">
		        <i class="fa fa-home"></i>
		      </div>
		      <p class="weui-tabbar__label">首页</p>
		    </a>
		    <a th:if="${index == 2}" href="mobileItem.xhtml" class="weui-tabbar__item weui-bar__item--on">
		      <div class="weui-tabbar__icon">
		        <i class="fa fa-th-large"></i>
		      </div>
		      <p class="weui-tabbar__label">分类</p>
		    </a>
		    <a th:if="${index != 2}" href="mobileItem.xhtml" class="weui-tabbar__item">
		      <div class="weui-tabbar__icon">
		        <i class="fa fa-th-large"></i>
		      </div>
		      <p class="weui-tabbar__label">分类</p>
		    </a>
		    <a th:if="${index == 3}" href="mobileshoppingcart.xhtml" class="weui-tabbar__item weui-bar__item--on">
		      <span class="weui-badge" style="position: absolute;top: -.4em;margin-left:20px;" th:if="${carnum} gt 0" th:text="${carnum}"></span>
		      <div class="weui-tabbar__icon">
		        <i class="fa fa-cart-plus"></i>
		      </div>
		      <p class="weui-tabbar__label">购物车</p>
		    </a>
		    <a th:if="${index != 3}" href="mobileshoppingcart.xhtml" class="weui-tabbar__item">
		      <span class="weui-badge" style="position: absolute;top: -.4em;margin-left:20px;" th:if="${carnum} gt 0" th:text="${carnum}"></span>
		      <div class="weui-tabbar__icon">
		        <i class="fa fa-cart-plus"></i>
		      </div>
		      <p class="weui-tabbar__label">购物车</p>
		    </a>
		    <a th:if="${index == 4}" href="mobilepersonal.xhtml" class="weui-tabbar__item weui-bar__item--on">
		      <div class="weui-tabbar__icon">
		        <i class="fa fa-user-circle-o"></i>
		      </div>
		      <p class="weui-tabbar__label">个人中心</p>
		    </a>
		    <a th:if="${index != 4}" href="mobilepersonal.xhtml" class="weui-tabbar__item">
		      <div class="weui-tabbar__icon">
		        <i class="fa fa-user-circle-o"></i>
		      </div>
		      <p class="weui-tabbar__label">个人中心</p>
		    </a>
		  </div>
		  <script type="text/javascript" th:src="@{{js}/mobile/member/common.js(js=${js})}"></script>	
	</th:block>
</html>